package com.zzzy.sys.vo.profile;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;


@Schema(description = "用户个人信息更新")
@Data
public class UserProfileUpdateReq {

    @Schema(description = "真实姓名", example = "测试01")
    @NotBlank(message = "真实姓名不能为空")
    @Length(max = 30, message = "真实姓名不能超过30个字符")
    private String nickName;

    @Schema(description = "性别", example = "男")
    private String sex;

    @Schema(description = "手机号码", example = "13333333333")
    @Pattern(regexp = "^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1})|(19[0-9]{1}))+\\d{8})$", message = "请输入正确手机号")
    @NotBlank(message = "手机号码不能为空")
    private String phoneNumber;

    @Schema(description = "邮箱", example = "2222222@qq.com")
    @Email(message = "请输入正确邮箱")
    private String email;

}
